package org.example.controller;

import org.example.entity.Major;
import org.example.service.TeaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/mas")
public class MaController {
    @Autowired
    private TeaService teaService;

    @GetMapping
    public List<Major> getAll(){
        return teaService.getAll();
    }
}
